#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    int value = ui->dial->value();
    ui->label->setText("当前透明度为："+QString::number(value));
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_dial_valueChanged(int value)
{
    this->setWindowOpacity((double)value/100);
    ui->label->setText("当前透明度为："+QString::number(value));
}
